﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ExcelBuilder
{
    public partial class ConstantsForm : Form
    {
        public Boolean isOkay = false;
        public String directoryString;

        public ConstantsForm()
        {
            InitializeComponent();
        }

        private void btn_okay_Click(object sender, EventArgs e)
        {
            if (tb_Directory.Text != "")
            {
                isOkay = true;
                Application.Exit();
            }
            else
            {
                MessageBox.Show("Choose a directory");
            }
        }

        private void btn_browse_Click(object sender, EventArgs e)
        {
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                tb_Directory.Text = dlg.SelectedPath;
            }
        }

        private void tb_Directory_TextChanged(object sender, EventArgs e)
        {
            directoryString = tb_Directory.Text;
        }

        private void btn_cancel_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void ConstantsForm_Load(object sender, EventArgs e)
        {
            dat_currentDate.Value = DateTime.Now;
        }
    }
}
